﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Bussiness.Manager;
using Bussiness.Entity;

public partial class News_Detail : MP.Core.Authentication.Page.AuthenticationBase
{
    public Int32 IntIdNews
    {
        get { return !string.IsNullOrEmpty(Request["textid"]) ? Int32.Parse(Request["textid"]) : -1; }
    }
   
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            if (IntIdNews == -1)
                navi.Add("Tin tức", "/News/News.aspx?t=tin-tuc", "Tin tức", false);
            else
            {

                DataTable dtNewsCat = CmsNewsInfosManager.CreateInstant().getCatIntIdByNewsIntId(IntIdNews);
                if (dtNewsCat.Rows.Count > 0)
                {
                    Int32 IntIdCat = Int32.Parse(dtNewsCat.Rows[0]["IntIdCat"].ToString());

                    DataTable dt = CmsCategoryManager.CreateInstant().GetCategoryListByLang("NEWS", "vi-VN", IntIdCat);
                    if (dt.Rows.Count > 0)
                    {
                        navi.Add("Tin tức", "/News/News.aspx?t=tin-tuc", "Tin tức");
                        navi.Add(dt.Rows[0]["CatName"].ToString(), "/News/News.aspx?t=tin-tuc&ID=" + IntIdCat);
                    }

                }

            }
            navi.StartBreadcrumb();
      WB.Library.CookieManager.setCookie(Page, "CurrentPage", "liNew");

        }
    }
}